
function populateMake()
{
	var selectedType = document.getElementById("vehicletype").value;
	$.post("populate-dropdowns.php",{type:selectedType,action:"populate-make"},function (data)
	{
		document.getElementById('divMakeDDL').innerHTML = data;
		populateModel();
	});
}

function populateModel()
{
	var selectedType = document.getElementById("vehicletype").value;
	var selectedMake = document.getElementById("vehiclemake").value;
	$.post("populate-dropdowns.php",{type:selectedType,make:selectedMake,action:"populate-model"},function (data)
	{
		document.getElementById('divModelDDL').innerHTML = data;
		populateYear();
	});
}

function populateYear()
{
	var selectedType = document.getElementById("vehicletype").value;
	var selectedMake = document.getElementById("vehiclemake").value;
	var selectedModel = document.getElementById("vehiclemodel").value;
	$.post("populate-dropdowns.php",{type:selectedType,make:selectedMake,model:selectedModel,action:"populate-year"},function (data)
	{
		document.getElementById('divYearDDL').innerHTML = data;
	});
}
